<?php
  $children = Array(
  	"Tommy Pickles",
  	"Jedidiah Bitslow",
  	"Chuck Finster",
  	"Angelica Pickles",
  	"Kimi Finster",
  	"Lilly Deville",
  	"Susie Carmichael"
  	);
  	$v = $_GET['q'];
  $out = Array();
   foreach ($children as $child) {
        if ( strpos(strtolower(" ".$child), strtolower($_GET['q'])) != false ) {
        	$out[] = "{\"name\":\"{$child}\",\"id\":\"{$child}\"}";
        }
    }
  echo "[" . implode(",",$out) . "]";
?>